package com.ruoyi.game.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.game.mapper.GameRoomcardTxnMapper;
import com.ruoyi.game.domain.GameRoomcardTxn;
import com.ruoyi.game.service.IGameRoomcardTxnService;

/**
 * 房卡流水Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-18
 */
@Service
public class GameRoomcardTxnServiceImpl implements IGameRoomcardTxnService 
{
    @Autowired
    private GameRoomcardTxnMapper gameRoomcardTxnMapper;

    /**
     * 查询房卡流水
     * 
     * @param id 房卡流水主键
     * @return 房卡流水
     */
    @Override
    public GameRoomcardTxn selectGameRoomcardTxnById(Long id)
    {
        return gameRoomcardTxnMapper.selectGameRoomcardTxnById(id);
    }

    /**
     * 查询房卡流水列表
     * 
     * @param gameRoomcardTxn 房卡流水
     * @return 房卡流水
     */
    @Override
    public List<GameRoomcardTxn> selectGameRoomcardTxnList(GameRoomcardTxn gameRoomcardTxn)
    {
        return gameRoomcardTxnMapper.selectGameRoomcardTxnList(gameRoomcardTxn);
    }

    /**
     * 新增房卡流水
     * 
     * @param gameRoomcardTxn 房卡流水
     * @return 结果
     */
    @Override
    public int insertGameRoomcardTxn(GameRoomcardTxn gameRoomcardTxn)
    {
        gameRoomcardTxn.setCreateTime(DateUtils.getNowDate());
        return gameRoomcardTxnMapper.insertGameRoomcardTxn(gameRoomcardTxn);
    }

    /**
     * 修改房卡流水
     * 
     * @param gameRoomcardTxn 房卡流水
     * @return 结果
     */
    @Override
    public int updateGameRoomcardTxn(GameRoomcardTxn gameRoomcardTxn)
    {
        gameRoomcardTxn.setUpdateTime(DateUtils.getNowDate());
        return gameRoomcardTxnMapper.updateGameRoomcardTxn(gameRoomcardTxn);
    }

    /**
     * 批量删除房卡流水
     * 
     * @param ids 需要删除的房卡流水主键
     * @return 结果
     */
    @Override
    public int deleteGameRoomcardTxnByIds(Long[] ids)
    {
        return gameRoomcardTxnMapper.deleteGameRoomcardTxnByIds(ids);
    }

    /**
     * 删除房卡流水信息
     * 
     * @param id 房卡流水主键
     * @return 结果
     */
    @Override
    public int deleteGameRoomcardTxnById(Long id)
    {
        return gameRoomcardTxnMapper.deleteGameRoomcardTxnById(id);
    }
}
